package vn.bus.models;

import java.sql.Connection;
import java.util.ArrayList;

import vn.bus.dao.Database;
import vn.bus.dao.TimetableDAO;
import vn.bus.dto.TimetableDTO;

public class TimetableManager {

	public ArrayList<TimetableDTO> getAllTimetables()throws Exception {
		ArrayList<TimetableDTO> allTimetables = null;
		try {
			    Database database= new Database();
			    Connection connection = database.Get_Connection();
			    TimetableDAO Timetable= new TimetableDAO();
			    allTimetables = Timetable.getAllTimetables(connection);
			    connection.close();
		
		} catch (Exception e) {
			throw e;
		}
		return allTimetables;
	}
}
